﻿using System;

namespace Cms.Domain.Authentication
{
    [Serializable]
    public class AuthenticatedUser
    {
        private int _administratorID;
        private int _userID;

        public int AdministratorID
        {
            get { return _administratorID; }
            set { _administratorID = value; }
        }
        
        public int UserID
        {
            get { return _userID; }
            set { _userID = value; }
        }
        
        public string GetName()
        {
            string name = string.Empty;
            if (_userID > 0)
            {
                name = "U" + _userID;
            }
            if (_administratorID > 0)
            {
                if (name.Length > 0)
                {
                    name += "|";
                }
                name += "A" + _administratorID;
            }
            return name;
        }
    }
}